package by.demchenko.sample.dataaccess.base;

import javax.transaction.Transactional;
import java.util.List;

public interface AbstractDao<ID, Entity> {
    Entity getById(ID id);

    @Transactional
    Entity insert(Entity entity);

    @Transactional
    void delete(ID id);

    @Transactional
    void deleteAll();

    @Transactional
    void delete(List<ID> ids);

    List<Entity> findAll();

    @Transactional
    Entity update(Entity entity);

}